<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>订单详情页</title>
<link rel="stylesheet" href="../assets/js/layui/css/layui.css" media="all">
</head>
<body>
	<div id="order_List" class="layui-container">
	</div>
	
 <script id="template_order" type="text/html">
	<div class="layui-row"><span >订单编号：{{ d.id }}</span>&nbsp;&nbsp; <span ">订单时间：{{ d.buyDate }}</span>&nbsp;&nbsp; <span ">{{ d.orderIsActive.orderIsActiveName }}</span></div>
	<div class="layui-row"><span>订单金额：{{ d.adjustedPrice }}</span> </div>
	<div class="layui-row">电影名：{{d.schedule.movieName }} </div>
	<div class="layui-row"><span>场次：{{d.schedule.showTime }}</span>&nbsp;&nbsp;  <span>影厅：{{ d.schedule.description }}</span>  </div>	
	<div class="layui-row">座位：{{# for(var i=0;i<d.seatList.length;i++){ }}
			     {{ d.seatList[i].row }}排{{ d.seatList[i].line }}座&nbsp;&nbsp;
			 {{# } }}
	 </div>	
	
	
	</script>
<script  src="../assets/js/jquery-3.3.1.js"></script>
<script src="../assets/js/layui/layui.js"></script> 
<script  src="../assets/js/layer/layer.js"></script>
<script src="../static/js/test.js" ></script>
<script  type="text/javascript">
	var orderId = getUrlParam('orderId');  //引用 test.js 方法
	$(function(){
		getOrderDetail();
	});
	
	function getOrderDetail(){
		$.ajax({
			url:"/moviesMaven/order/getOrderByOrderId.htm" ,
			dataType:"json",
			data:{"orderId":orderId},
			success:function(data){
				renderData_order(data.result)
			},
			errorr:function(){
				layer.msg("返回数据出现异常");
			}
			
			
			
		});
		
	}
	
	//模板引擎渲染页面
	function  renderData_order(data){
		
		layui.use("laytpl",function(){
			var laytpl = layui.laytpl;
			
			var template_order = $("#template_order").html();
			laytpl(template_order).render(data,function(html){
				$("#order_List").html(html);
		
			});
			

		});

	}

</script>
	
</body>




</html>